import ThreeLayersSkel from "@/components/ui/skeleton/three_layers_skeleton";
import { useState } from "react";
import GenerateBtnTop from "./generate_btn_top";
import GenerateTable from "./table/generate_table";

export function GenerateDown({
  batch,
  selectedType,
}: {
  batch: string;
  selectedType: string;
}) {
  const [options, setOptions] = useState<GenerateRowProps[]>([]);

  return (
    <ThreeLayersSkel
      slot1={
        <GenerateBtnTop
          searchBatch={batch}
          selectedType={selectedType}
          setOptions={setOptions}
        />
      }
      slot3={
        <GenerateTable
          searchBatch={batch}
          selectedType={selectedType}
          options={options}
          setOptions={setOptions}
        />
      }
    />
  );
}
